package com.hxzy.mapper;

import com.hxzy.entity.Orders;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.math.BigDecimal;
import java.util.Date;

/**
* @author 11452
* @description 针对表【orders(订单表)】的数据库操作Mapper
* @createDate 2023-08-28 11:54:55
* @Entity com.hxzy.entity.Orders
*/
public interface OrdersMapper extends BaseMapper<Orders> {

    int updatePayStatusByOrderId(@Param(value = "orderNumber") String orderNumber,
                                 @Param(value = "payDate")Date payDate,
                                 @Param(value = "bigDecimal")BigDecimal bigDecimal,
                                 @Param(value = "alipayTradeNo")String alipayTradeNo);

    @Update(value = "update orders set checkout_time=null where number=#{outTradeNo}")
    int cancelCheckOutTime(String outTradeNo);
}




